<nav class="navbar navbar-default navbar-fixed-top navbar-shrink">
    <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header page-scroll">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <%= link_to site_name_no_space+"(Beta)", root_path, :class => 'navbar-brand' %>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav navbar-right">
                <% if user_signed_in? %>
                    <% if @profile and @profile.name.present? %>
                      <li><%= link_to @profile.name, profile_path(@profile) %><li>
                    <% end %>
                    <li><%= link_to "My Profiles", profiles_path %><li>
                    <li><%= link_to truncate(current_user.email, :length => 15), edit_user_registration_path %></li>
                    <li><%= link_to 'Logout', destroy_user_session_path, {:method=>'delete', :style=>"margin:0 6px; border:solid 2px;"} %></li>

                <% else %>
                    <li><%= link_to 'Sign up', new_user_registration_path %></li>
                    <li><%= link_to 'Login', new_user_session_path %></li>
                <% end %>

            </ul>
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container-fluid -->
</nav>
